﻿#pragma once
#include"MyGridCell.h"
#include"GridCtrl_src\GridCtrl.h"
#include"Resize.h"
#include <atltime.h>
#include"CGridCellProp.h"
// CMyDialog1 对话框
class CMyDialog1 : public CDialogEx
{
	DECLARE_DYNAMIC(CMyDialog1)

public:
	CMyDialog1(CWnd* pParent = nullptr);   // 标准构造函数
	CWindowSizeMange m_WinSizeManage;
	CTime time, dispTime;
	int	timerId = 0;;
	int timeSpeed[5] = { 1000, 500 * 60, 250 * 60, 125 * 60, 62 * 60 };
	int curSpeed = 0;
	virtual ~CMyDialog1();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = DIALOG_TIMETABLE };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	CGridCtrl m_grid1;
	virtual BOOL OnInitDialog();
	afx_msg void OnInitialDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnTimer(UINT_PTR);
	afx_msg void OnClose();
	afx_msg void OnGridClick(NMHDR* pNotifyStruct, LRESULT* pResult);
	void initCell();
	void OnDestroy();

	void OnCellNormal();
	void updateDate();
	// 年月日
	CString yearAndDay;
	// 小时与分钟
	CString hourAndMin;
	CString displayDate;
	// 用来选择要展示的日期
	CDateTimeCtrl datetimePick;
	afx_msg void OnDtnDatetimechangeDatetimepick(NMHDR* pNMHDR, LRESULT* pResult);
};
